package net.bluemind.ysnp.impl;

import java.util.Comparator;

import net.bluemind.ysnp.ICredentialValidatorFactory;

/**
 * sort by ascending priority (low number means high priority)
 * 
 * @author tom
 *
 */
public class ValidatorsComparator implements
		Comparator<ICredentialValidatorFactory> {

	@Override
	public int compare(ICredentialValidatorFactory o1,
			ICredentialValidatorFactory o2) {
		return new Integer(o1.getPriority()).compareTo(o2.getPriority());
	}

}
